home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00b.txt
/
000136_icon-group-sender_Wed Nov 1 13:31:13 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id eA1KTjf17206
for icon-group-addresses; Wed, 1 Nov 2000 13:29:45 -0700 (MST)
Message-Id: <200011012029.eA1KTjf17206@baskerville.CS.Arizona.EDU>
Date: Wed, 01 Nov 2000 13:59:58 -0600
From: Carl Sturtivant <carl@elegantus.com>
X-Accept-Language: en
To: Icon Group <icon-group@cs.arizona.edu>
Subject: Re: How would the experts handle this...??
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 786
Here's how I'd do this:
procedure main()
port := table(''); starboard := table('')
while line := read() do {
reverse(line) ? while port[move(1)] ++:= move(1) do move(-1)
line ? while starboard[move(1)] ++:= move(1) do move(-1)
}
every ch := !&cset do {
pchars := port[ch]; schars := starboard[ch]
if *(pchars ++ schars) > 0 then
write(image(ch), ":\t", image(pchars), ", ", image(schars))
}
end
Carl Sturtivant
symbiot@my-deja.com wrote:
> I wish to scan thru a file and determine how letters "connect" with
one
> another. By that I mean that for every letter of the alphabet, I would
> like to compile two lists: one containing all the letters which apper
> to the right of the given letter, and another for all those appearing
> to the left.